// import $http from '../utils/axios_test'
import axios from '../utils/axios.js'
// interface login {
//     username: string,
//     password: string
// }
interface alertUserData {
    password: string,
    nickname: string,
    sign: string,
}

// export const loginUser = (data: login) => axios({ method: 'post', url: 'http://localhost:8080/pee/login', data }).then(
//     response => {
//         console.log(response.data.data);
//         localStorage.setItem("Cusertoken", `${'Bearer'} ${response.data.data}`)
//     },
//     error => {
//         return Promise.reject(error)
//     }
// )
export const alertUserData = (data: alertUserData, userId: number) => axios({ method: "put", url: `/foo/api/v1/users/${userId}`, data })
export const getCurrentUserData = () => axios({ method: 'get', url: '/foo/api/v1/users' })
